/*    */ package com.zimbra.cs.account.ldap;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.cs.account.Account;
/*    */ import com.zimbra.cs.account.Entry;
/*    */ import com.zimbra.cs.extension.ExtensionUtil;
/*    */ import java.lang.reflect.Constructor;
/*    */ import java.lang.reflect.InvocationTargetException;
/*    */ import java.util.Map;
/*    */ import java.util.Set;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public abstract class LdapSMIMEConfig
/*    */ {
/*    */   public static LdapSMIMEConfig getInstance()
/*    */     throws ServiceException
/*    */   {
/* 33 */     return getInstance(null);
/*    */   }
/*    */   
/*    */   public static LdapSMIMEConfig getInstance(Entry entry) throws ServiceException {
/* 37 */     String className = "com.zimbra.cs.account.ldap.LdapSMIMEConfigImpl";
/* 38 */     LdapSMIMEConfig instance = null;
/*    */     try
/*    */     {
/* 41 */       if (entry == null) {
/* 42 */         instance = (LdapSMIMEConfig)ExtensionUtil.findClass(className).newInstance();
/*    */       } else {
/* 44 */         instance = (LdapSMIMEConfig)ExtensionUtil.findClass(className).getConstructor(new Class[] { Entry.class }).newInstance(new Object[] { entry });
/*    */       }
/*    */     } catch (ClassNotFoundException e) {
/* 47 */       throw ServiceException.FAILURE("cannot instantiate " + className, e);
/*    */     } catch (IllegalArgumentException e) {
/* 49 */       throw ServiceException.FAILURE("cannot instantiate " + className, e);
/*    */     } catch (SecurityException e) {
/* 51 */       throw ServiceException.FAILURE("cannot instantiate " + className, e);
/*    */     } catch (InstantiationException e) {
/* 53 */       throw ServiceException.FAILURE("cannot instantiate " + className, e);
/*    */     } catch (IllegalAccessException e) {
/* 55 */       throw ServiceException.FAILURE("cannot instantiate " + className, e);
/*    */     } catch (InvocationTargetException e) {
/* 57 */       throw ServiceException.FAILURE("cannot instantiate " + className, e);
/*    */     } catch (NoSuchMethodException e) {
/* 59 */       throw ServiceException.FAILURE("cannot instantiate " + className, e);
/*    */     }
/*    */     
/* 62 */     if (instance == null) {
/* 63 */       throw ServiceException.FAILURE("cannot instantiate " + className, null);
/*    */     }
/*    */     
/* 66 */     return instance;
/*    */   }
/*    */   
/*    */   public abstract Set<String> getAllSMIMEAttributes();
/*    */   
/*    */   public abstract Map<String, Map<String, Object>> get(String paramString)
/*    */     throws ServiceException;
/*    */   
/*    */   public abstract void modify(String paramString, Map<String, Object> paramMap)
/*    */     throws ServiceException;
/*    */   
/*    */   public abstract void remove(String paramString)
/*    */     throws ServiceException;
/*    */   
/*    */   public abstract void lookupPublicKeys(Account paramAccount, String paramString, ResultCallback paramResultCallback)
/*    */     throws ServiceException;
/*    */   
/*    */   public static abstract interface ResultCallback
/*    */   {
/*    */     public abstract void add(String paramString1, String paramString2);
/*    */     
/*    */     public abstract boolean continueWithNextConfig();
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/account/ldap/LdapSMIMEConfig.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */